#!/usr/bin/python

import sys
import gobject
from mainbar import *

#test
APP_NAME	= ('Feedbar')
APP_VERSION	= '0.01'

DIR_USER	= os.environ['HOME'] + '/.feedbar'
DIR_TMP		= '/tmp/feedbar/'

#test
def create_user_dir ():
    """Create the userdir for the feedbar."""
    for x in [DIR_USER, DIR_USER + "/images", DIR_USER + "/tmp"]:
        if not os.path.isdir(x):
            os.mkdir(x)
    if not os.path.isfile(DIR_USER + "/feeds.cfg"):
        preferences = open(DIR_USER + "/preferences.cfg", 'w')
    if not os.path.isfile(DIR_USER + "/feeds.cfg"):
        feeds = open(DIR_USER + "/feeds.cfg", 'w')


def start_bar ():
    create_user_dir()

    bar = Bar()
    reactor.run()
